package com.GameSpace.CoreAssets;

import com.GameSpace.CoreAssets.Board;

import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;

public class HeaderFooterWrapper extends LinearLayout
{
	public HeaderFooterWrapper(Context context,Board board,View f,View h) {
		super(context);
		LinearLayout.LayoutParams lp =
			new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT,
					LayoutParams.WRAP_CONTENT );
		this.setLayoutParams(lp);
		
		LinearLayout.LayoutParams tlp =
			new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT,
			LayoutParams.WRAP_CONTENT );

		LinearLayout.LayoutParams tlp2 =
			new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT,
			LayoutParams.WRAP_CONTENT );
		tlp2.weight=1.0f;
		
		LinearLayout.LayoutParams tlp3 =
			new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT,
			LayoutParams.WRAP_CONTENT );

		this.setOrientation(VERTICAL);
		this.setLayoutParams(lp);
		if(h!=null)
			this.addView(h,tlp);

		this.addView(board,tlp2);
		if(f!=null)
			this.addView(f,tlp3);
		this.invalidate();
		// TODO Auto-generated constructor stub
	}
	
	
}
